package leetcode.动态规划;

public class 爬楼梯70 {

    public int climbStairs(int n) {
        int[] res = new int[n+1];
        res[0] = 1;
        res[1] = 1;
        for (int i = 2; i < n+1; i++) {
            res[i] = res[i-1] + res[i-2];
        }
        return res[n];
    }


    public static void main(String[] args) {
        new 爬楼梯70().climbStairs(2);
    }
}
